import request from '@/utils/request'
import BaseUrl from '../BaseUrl'

const systemPath = BaseUrl.getDefaultBaseUrl()
const modulePath = systemPath + '/config'

export const apiConfig = {
  listMall: function() {
    return request({
      url: modulePath + '/mall',
      method: 'get'
    })
  },

  updateMall: function(data) {
    return request({
      url: modulePath + '/mall',
      method: 'post',
      data
    })
  },

  listExpress: function() {
    return request({
      url: modulePath + '/express',
      method: 'get'
    })
  },
  updateExpress: function(data) {
    return request({
      url: modulePath + '/express',
      method: 'post',
      data
    })
  },

  listOrder: function() {
    return request({
      url: modulePath + '/order',
      method: 'get'
    })
  },

  updateOrder: function(data) {
    return request({
      url: modulePath + '/order',
      method: 'post',
      data
    })
  },

  listWx: function() {
    return request({
      url: modulePath + '/wx',
      method: 'get'
    })
  },

  updateWx: function(data) {
    return request({
      url: modulePath + '/wx',
      method: 'post',
      data
    })
  }
}
